#define _CRT_SECURE_NO_WARNINGS 1

#include"Heap.h"

void CreateData()
{
	int n = 10000000;

	srand(time(0));

	const char* file = "data.txt";
	FILE* f = fopen(file, "w");
	if (f == NULL)
	{
		perror("fopen fail");
		return;
	}

	for (int i = 0; i < n-3; i++)
	{
		int x = (rand() + i) % n;
		fprintf(f, "%d\n", x);
	}

	fprintf(f, "%d\n", n + 1);
	fprintf(f, "%d\n", n + 2);
	fprintf(f, "%d\n", n + 3);

	fclose(f);
}

int main()
{
	//CreateData();
	TopK("data.txt",3);
	return 0;
}